package com.ruoyi.system.afteruser.service.impl;

import java.util.List;
import com.ruoyi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.afteruser.mapper.SaleAfterUserMapper;
import com.ruoyi.system.afteruser.domain.SaleAfterUser;
import com.ruoyi.system.afteruser.service.ISaleAfterUserService;

/**
 * 用户填报Service业务层处理
 * 
 * @author ruoyi
 * @date 2024-06-13
 */
@Service
public class SaleAfterUserServiceImpl implements ISaleAfterUserService 
{
    @Autowired
    private SaleAfterUserMapper saleAfterUserMapper;

    /**
     * 查询用户填报
     * 
     * @param id 用户填报主键
     * @return 用户填报
     */
    @Override
    public SaleAfterUser selectSaleAfterUserById(Long id)
    {
        return saleAfterUserMapper.selectSaleAfterUserById(id);
    }

    /**
     * 查询用户填报列表
     * 
     * @param saleAfterUser 用户填报
     * @return 用户填报
     */
    @Override
    public List<SaleAfterUser> selectSaleAfterUserList(SaleAfterUser saleAfterUser)
    {
        return saleAfterUserMapper.selectSaleAfterUserList(saleAfterUser);
    }

    /**
     * 新增用户填报
     * 
     * @param saleAfterUser 用户填报
     * @return 结果
     */
    @Override
    public int insertSaleAfterUser(SaleAfterUser saleAfterUser)
    {
        saleAfterUser.setCreateTime(DateUtils.getNowDate());
        saleAfterUser.setStatus("1");
        return saleAfterUserMapper.insertSaleAfterUser(saleAfterUser);
    }

    /**
     * 修改用户填报
     * 
     * @param saleAfterUser 用户填报
     * @return 结果
     */
    @Override
    public int updateSaleAfterUser(SaleAfterUser saleAfterUser)
    {
        return saleAfterUserMapper.updateSaleAfterUser(saleAfterUser);
    }

    /**
     * 批量删除用户填报
     * 
     * @param ids 需要删除的用户填报主键
     * @return 结果
     */
    @Override
    public int deleteSaleAfterUserByIds(Long[] ids)
    {
        return saleAfterUserMapper.deleteSaleAfterUserByIds(ids);
    }

    /**
     * 删除用户填报信息
     * 
     * @param id 用户填报主键
     * @return 结果
     */
    @Override
    public int deleteSaleAfterUserById(Long id)
    {
        return saleAfterUserMapper.deleteSaleAfterUserById(id);
    }
}
